package com.db.morphia.entity;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Property;

/**
 * 利用morphia的annotation进行注解
 * @author Ackles
 */
@Entity(value = "actor")
public class Actor {
	@Id
	private ObjectId id;
	@Property
	private String name;
	@Property
	private boolean sex;

	public Actor(String name, boolean sex) {
		this.name = name;
		this.sex = sex;
	}

	public String getName() {
		return name;
	}

	public boolean isSex() {
		return sex;
	}
}